<template>
  <div class="tabbar">
     <span v-for="(item,index) in tabs" :key="index">{{item}}</span>
     <p>{{num}}</p>
     <button @click="add">累加</button>
  </div>
</template>

<script>
import { ref, reactive, toRefs } from "vue";
export default {
  props:{
    // tabs: [Array,Number,String]
    // tabs: Array,
    tabs: {
      type: Array,
      default: () => ['首页','about']
    },
    num: Number
  },
  setup(props,{emit}) {
    // console.log(ctx);
    const add = () => {
      emit('add',56);
    }
    return{
      add
    }
  },
};
</script>
<style lang="scss" scoped>
</style>